<%@ page language="java" 
	contentType="text/html; 
	charset=UTF-8"
	pageEncoding="UTF-8"
	import="connectMysql.TestConnect"
	%>
	
	
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>检查</title>
</head>
<body>
<%
	String user_id=request.getParameter("userid");
	String work_id=request.getParameter("workid");
	String class_id=request.getParameter("classid");
	String describe=request.getParameter("describe");
	String handin_time=request.getParameter("handin_time");
	String in_time=request.getParameter("intime");
	String message="提交失败！";
	if(in_time.equals("true")){
		boolean handin_res=connectMysql.TestConnect.handin_homework(class_id, work_id, describe, handin_time, user_id);
		if (handin_res)
			message="提交成功！";
	}else{
		message="不在规定时间内！";
	}
%>
	<script>
	    alert("<%= message%>");
	    window.location="main.jsp?id=<%=user_id%>";
	</script>


</body>
</html>